package com.hexinfo.dmpro.sparing.service;


import cn.hutool.db.Entity;
import com.hexinfo.dmpro.sparing.dto.CreateTableDTO;
import com.hexinfo.dmpro.sparing.dto.LatestTableDTO;
import com.hexinfo.dmpro.sparing.dto.LsHdfsDTO;
import com.hexinfo.dmpro.sparing.model.HiveTableInfo;
import com.hexinfo.dmpro.sparing.model.ScanMetadata;
import org.springframework.stereotype.Service;

import java.util.List;


public interface HiveToOracleService {

    Integer selectHiveTableCount();

    Integer hiveSqlOracleIncrementCount(Long staTime,Long endTime);

    List<ScanMetadata> selectHiveTableInfo(int sta,int end);

    List<ScanMetadata> selectHiveTableList(String tblDatabaseName,String tblNameWhere);


    List<String> selectHiveComplete(String tblDatabaseName);
    /**
     *
     * @param tableName 表名
     * @param pkeyPartName 分区名
     * @param pkeyPartName 分区名
     * @param year
     * @param format
     * @param dbName
     * @return
     */
    List<String> selectHiveTableHDFS(String tableName,String partNameWhere,String pkeyPartName,int year,String format,String dbName);

    List<String> selectHiveTableHDFSBee(String tableName,String partNameWhere,String pkeyPartName,String staTime,String endTime,String format,String dbName);

    List<String> selectHivePkeyName(String tableName,String dbName);

    List<String> selectHiveLocation(String where,String tableName,String dbName);

    List<String> selectHiveLocationUat(String dbName,String tableName);

    List<CreateTableDTO> selectHiveLatestTable(String dbName,long staTime, long endTime);

    void txtFileSD(List<ScanMetadata> list, String title);

    void excelFileSD(List<ScanMetadata> list, String title);

    List<ScanMetadata> hiveSqlOracleIncrement(Long staTime,Long endTime,int sta,int end);

    int lsHdfs(LsHdfsDTO dto);

    List<CreateTableDTO> hiveQueryLibraryTable(String flag);
}
